//
//  ThemeManage.m
//  夜间模式9-27
//
//  Created by dllo on 15/9/27.
//  Copyright (c) 2015年 直到世界的尽头. All rights reserved.
//

#import "ThemeManage.h"
static ThemeManage *manage;
@implementation ThemeManage

#pragma mark - 单例的初始化
+(ThemeManage *)shareThemeManage
{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        manage = [[ThemeManage alloc] init];
    });
    return manage;
}

#pragma mark 重写isNight的set方法
-(void)setIsNight:(BOOL)isNight
{
//    _isNight = isNight;
    if ([[NSUserDefaults standardUserDefaults] boolForKey:@"nightModel"]) {
        _isNight = 1;
    }else{
        _isNight = 0;
    }
    
    if (self.isNight) {
        self.bgColor = [UIColor colorWithRed:0.33 green:0.33 blue:0.33 alpha:1];
        self.textColor = [UIColor whiteColor];
        self.color1 = [UIColor colorWithRed:0.24 green:0.24 blue:0.24 alpha:1];
        self.navBarColor = [UIColor grayColor];
        self.color2 = [UIColor grayColor];
        self.textColorGray = [UIColor lightGrayColor];
    }
    else{
        self.bgColor = [UIColor whiteColor];
        self.textColor = [UIColor colorWithRed:0.16 green:0.16 blue:0.16 alpha:1];
//        self.color1 = [UIColor colorWithRed:0.41 green:0.73 blue:0.56 alpha:1];
        //粉
//        self.color1 = [UIColor colorWithRed:1 green:0.69 blue:0.66 alpha:1];
        //淡淡地
        self.color1 = [UIColor colorWithRed:0.54 green:0.78 blue:0.64 alpha:1];
        
        self.navBarColor = [UIColor colorWithRed:0.41 green:0.73 blue:0.56 alpha:1];
        self.color2 = [UIColor whiteColor];
        self.textColorGray = [UIColor grayColor];
    }
}

@end
